PEOutputToWindow
Use PEOutputToWindow to direct printed output to a preview window. This function is used as part of a Custom-Print Link whenever you want the report printed to the preview window instead of to the printer.
C Syntax
BOOL CRPE_API PEOutputToWindow (
short printJob,
const char FAR *title,
int left,
int top,
int width,
int height,
DWORD style,
HWND parentWindow );
Parameters
printJob
| Specifies the print job you want to print in the preview window.
|
title
| Specifies a pointer to the null-terminated string that contains the title that you want to appear in the preview window title bar.
|
left
| Specifies the x coordinate of the upper left corner of the preview window, in pixels. See Remarks below.
|
top
| Specifies the y coordinate of the upper left corner of the preview window, in pixels. See Remarks below.
|
width
| Specifies the width of the preview window, in pixels.
|
height
| Specifies the height of the preview window, in pixels.
|
style
| Specifies the style of the window being created. Style settings can be combined using the bitwise "OR" operator. You can specify any of the following window styles. Also, see Remarks below.
|
| Constant
| Value
| Description
|
| WS_MINIMIZE
| 536870912
| Make a window of minimum size.
|
| WS_VISIBLE
| 268435456
| Make a window that is visible when it first appears (for overlapping and pop-up windows).
|
| WS_DISABLED
| 134217728
| Make a window that is disabled when it first appears.
|
| WS_CLIPSIBLINGS
| 67108864
| Clip child windows with respect to one another.
|
| WS_CLIPCHILDREN
| 33554432
| Exclude the area occupied by child windows when drawing inside the parent window.
|
| WS_MAXIMIZE
| 16777216
| Make a window of maximum size.
|
| WS_CAPTION
| 12582912
| Make a window that includes a title bar.
|
| WS_BORDER
| 8388608
| Make a window that includes a border.
|
| WS_DLGFRAME
| 4194304
| Make a window that has a double border but no title.
|
| WS_VSCROLL
| 2097152
| Make a window that includes a vertical scroll bar.
|
| WS_HSCROLL
| 1048576
| Make a window that includes a horizontal scroll bar.
|
| WS_SYSMENU
| 524288
| Include the system menu box.
|
| WS_THICKFRAME
| 262144
| Include the thick frame that can be used to size the window.
|
| WS_MINIMIZEBOX
| 131072
| Include the minimize box.
|
| WS_MAXIMIZEBOX
| 65536
| Include the maximize box.
|
| CW_USEDFAULT
| -32768
| Assign the child window the default horizontal and vertical position, and the default height and width.
|
parentWindow
| Specifies the handle of the parentWindow if the preview window is a child of that window.
|
Returns
- TRUE if the call is successful.
- FALSE if the call fails.
Remarks
VB Syntax
Declare Function PEOutputToWindow Lib "crpe32.dll" (ByVal printJob As
Integer, ByVal Title As String, ByVal Left As Long, ByVal Top As Long,
ByVal Width As Long, ByVal Height As Long, ByVal style As Long, ByVal
PWindow As Long) As Integer
Visual Basic developers can cut and paste a declaration for CW_USEDEFAULT into their application.
- For VB 4, cut the declaration from c:\vb\winapi\win32api.txt
- For VB 3, cut the declaration from c:\vb\winapi\win30api.txt
Delphi Syntax
function PEOutputToWindow (
printJob: Word;
title: PChar;
left: longint;
top: longint;
width: longint;
height: longint;
style: longint;
parentWindow: HWnd
): Bool stdcall;
dBASE for Windows Syntax
EXTERN CLOGICAL PEOutputToWindow (CWORD, CSTRING, CWORD, CWORD, CWORD, CWORD, CLONG, CHANDLE) CRPE.DLL